package com.rd.student.jike.class1.guojiabao;

import java.util.LinkedList;

public class Test {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        Student student1 = new Student("芝士肥周","计科",1);
        Student student2 = new Student("芝士肥里","计科",1);
        Student student3 = new Student("孙昊","计科",1);
        Student student4 = new Student("郭佳宝","计科",1);
        Student student5 = new Student("高晨曦","软件",3);
        Student student6 = new Student("张思韬","软件",3);
        list.add(student1);
        list.add(student2);
        list.add(student3);
        list.add(student4);
        list.add(student5);
        list.add(student6);
        System.out.println(list);
    }
}
class Student{
    String name;
    String major;
    int num;
    Student(String name,String major,int num){
        this.name = name;
        this.major = major;
        this.num = num;

    }
    @Override
    public String toString() {
        return "学生" +
                "姓名='" + name + '\'' +
                ", 专业='" + major + '\'' +
                ", 班级=" + num +
                '\n';
    }
}